<template>
  <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
    <van-swipe-item v-for="item in Img" :key="item.imgSrc">
      <img :src="item.imgSrc"/>
    </van-swipe-item>
  </van-swipe>
</template>

<script setup lang="ts" >
import { ref } from 'vue'
import axios from 'axios'
interface ImgTtem{
  link:string,
  imgSrc:string
}
const Img = ref<ImgTtem[]>([])
axios({
  url:'/swiperList',
  method:'get'
}).then(res =>{
  Img.value = res.data.result
  console.log(Img.value)
})
</script>
<style scoped>
 .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    text-align: center;
    background-color: #f2f6f8;
  }
img{
  width: 100%;
} 
</style>